/**
 * Factory pattern:
 *
 * The primitive Factory can be a simple function, which takes the requirements for
 * the products as arguments and returns the forged products.
 *
 * The evolved Factory is the Class Constructor.
 *
 * I think the Factory should take the resposibility for both constructing & destroying
 * the products, and should have one interface to accept the requirements for the products
 * to make.*/
#include <iostream>
#include <string>
#include "ConcreteFactory.h"
int main() 
{
    AbstractFactory *factory = new ConcreteFactory();
    AbstractProduct* productA = factory->createProduct("A");
    AbstractProduct* productB = factory->createProduct("B");
    productA->operation();
    productB->operation();

	delete productA;
	delete productB;
	delete factory;
    return 0;
}
